package com.cugmarket.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * 
 * @TableName product_voucher
 */
@TableName(value ="product_voucher")
@Accessors(chain = true)
@Data
public class ProductVoucher implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * 
     */
    @TableId(value = "id")
    private String id;

    /**
     * 商品id
     */
    private String productId;

    /**
     * 优惠券名称
     */
    private String title;

    /**
     * 优惠金额
     */
    private Long voucherValue;

    /**
     * 库存
     */
    private Integer stock;

    /**
     * 开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private LocalDateTime beginTime;

    /**
     * 结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private LocalDateTime endTime;

    /**
     * 0不可见 1 可见
     */
    private Integer voucherStatus;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

}